Skip to content

Feature/credentials management #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 21, 2024

Conversation

dmitriin2
Copy link
Contributor

No description provided.

* Firsts basic tests + commented test fix

* util package coverage > 80%

* Infrastructure->Properties package coverage > 80%

* Infrastructure->controller package coverage > 80%

* Created test for workflows package

* Reorganization of model test files + new tests

* Domain->Entities package coverage > 80% + last branch merge

* Domain->Factory package coverage > 80%

* Tests for AuthServerConfig class + sonarlint issues fix

* New tests for config package

* test for verifiableCredentialService

* Service tests + use of @ExtendWith instead of MockitoAnnotations

* test for CredentialProcedureService

* New service tests

* Plugins and dependencies updates + Sonar corrections

* DTO package path correction

---------

Co-authored-by: RubenModamioGarcia <ruben.modamio@in2.es>
Co-authored-by: Dmitri Sidorov Manko <159002112+dmitriin2@users.noreply.github.com>
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
71.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@oriolcanades oriolcanades merged commit c6ed183 into release/v1.0.0 Jun 21, 2024
3 of 4 checks passed
@oriolcanades oriolcanades deleted the feature/credentials-management branch June 21, 2024 07:33
oriolcanades added a commit that referenced this pull request Jun 21, 2024
* Feature/implement lear credential profile 2 (#19)

* add get user data from local hardcoded file, disable commitCredential

* minor fix

* refactor single credential per request (jwt/cwt)

* WIP: remove walt.id for payload generation

* convert generateVcPayload into reactive

* remove Walt.id from VerifiableCredentialService

* app native VcTemplate for CredentialOffer and IssuerMetadata

* remove Walt.id from template service and controller

* remove Walt.id from dependencies, IssuerApplicationConfigs and additional files

* fix tests

* refactor CredentialOffer, add public endpoints to SecurityConfig, fix wellknown endpoint

* FIX: vc endpoint, nonce cache error, local file user data

* FIX: credential in cwt

* FIX: tests

* clean from temporal code, add tests for verifiableCredentialService and CredentialIssuerMetadataService

* fixme's and tests

* some sonar fixes

* FIX: code duplication and dockerfile

* refactor iamAdapter paths from configs, add tests

* fixmes and tests

* Review

* Review 1

* Review 1

* credentialOffer with type by param

* FIX: pre-auth-code for credential offer

* DEL: get credential by id and credential cache

* add diagrams, refactor verifiableCredential service into hexagonal, update credential offer

* REFACTOR: credential issuer metadata

* ADD: batch credential endpoint

* WIP: Proof validation

* FIX: token nonce cache saving, WIP: Proof validation

* Proof validation: validation of nonce

* ADD: decodification public key from kid, WIP:signature validation

* Complete Proof validation, add tx_code in credential offer, fix test

* adapt proofValidation to reactive

* FIX: tests

* ADD: test and fixes

* ADD fixes

* refactor issuer domain to external domain

* ADD more test

* ADD deferred emission endpoint methods and entity

* Implement LEARCredentialEmployee, fix dids deletion

* credential entity db persistance and operations, deferred endpoint logic

* refactor from jpa to R2DBC, credential retrival endpoint

* add deferred signing

* WIP review

* fix dependencies issues

* fetch tx_code from keycloak, fix format const, remove format from credentialResponse

* fix vc and vcpayload generation, fix signature

* ¨¨new entities wip

* persistance in credential_managment and credential_deferred tables

* add credential retrival and format

* tests

* decouple local signature mock, add json parsing to credential retrival

* minor fixes

* merge and fix test

* fix some tests

* Solve sonar issues

* Tests

* Update VerifiableCredentialIssuanceServiceImplTest.java

* add test for CredentialManagementController

* fix credentialManagementController test

* Update VerifiableCredentialIssuanceServiceImplTest.java

* appConfiguration for db

* test

* remove unused imports

* Tests

* add test for cbor

* db connection data in application file

* function and plugins for automatic dependencies update

* add webclient bean

* custom exceptions and using builder

* endpoint versions

* use of builder, credential status enum, constants for hardcoded data, custom exceptions

* fix globalExceptionHandler

* fix controllers with try catch blocks

* fix tests and sonar issue

* fix jwt decoder, update credential offer format and encoding

* Support for Accept-Language header. Only LEARCredentialEmployee in metadata endpoint

* fix: custom exception, error handling, content-language header and constants

* dedicated service for access token and userid extraction

* fix credential id and mandatee did injection

* clean tests from sonar issues

* implement EmailService for pin notification

* batch signed credentials update and pending credentials endpoints

* fix credentialOffer cache bug

* add tests

* Lear Profile changes

* Add LEARCredentialEmployee logic

* move nonce generation and validation to authorization server

* implement template for email

* LearChanges

* Lear Credential Changes

added enpoint to bind the access token to te corrrect Deferred Credential Metadata

* Add LEAR logic

* Comment tests

* Update version

* Remove unused imports

* Update VerifiableCredentialIssuanceServiceImpl.java

* Clean Credential Mocks

* Refactor issuer

* Refactor issuer

* Refactor controllers

* Refactor Dokerfile

* Fixes Dokerfile
Fixes Checkstyle

* Update Auth Server config

* Update configs

* Update configs

* Update configs

* Fix Factory

* Fix AZ config

* Fix AZ config

* Fix AZ config

* Issuer refactor

* unsecure endpoint for demo pruposes

---------

Co-authored-by: Dmitri Sidorov <dmitri.sidorov@in2.es>
Co-authored-by: Oriol Canadés <83498869+oriolcanadesin2@users.noreply.github.com>
Co-authored-by: Oriol Canadés <oriol.canades@in2.es>

* Feature/implement lear credential profile 2 (#20)

* add get user data from local hardcoded file, disable commitCredential

* minor fix

* refactor single credential per request (jwt/cwt)

* WIP: remove walt.id for payload generation

* convert generateVcPayload into reactive

* remove Walt.id from VerifiableCredentialService

* app native VcTemplate for CredentialOffer and IssuerMetadata

* remove Walt.id from template service and controller

* remove Walt.id from dependencies, IssuerApplicationConfigs and additional files

* fix tests

* refactor CredentialOffer, add public endpoints to SecurityConfig, fix wellknown endpoint

* FIX: vc endpoint, nonce cache error, local file user data

* FIX: credential in cwt

* FIX: tests

* clean from temporal code, add tests for verifiableCredentialService and CredentialIssuerMetadataService

* fixme's and tests

* some sonar fixes

* FIX: code duplication and dockerfile

* refactor iamAdapter paths from configs, add tests

* fixmes and tests

* Review

* Review 1

* Review 1

* credentialOffer with type by param

* FIX: pre-auth-code for credential offer

* DEL: get credential by id and credential cache

* add diagrams, refactor verifiableCredential service into hexagonal, update credential offer

* REFACTOR: credential issuer metadata

* ADD: batch credential endpoint

* WIP: Proof validation

* FIX: token nonce cache saving, WIP: Proof validation

* Proof validation: validation of nonce

* ADD: decodification public key from kid, WIP:signature validation

* Complete Proof validation, add tx_code in credential offer, fix test

* adapt proofValidation to reactive

* FIX: tests

* ADD: test and fixes

* ADD fixes

* refactor issuer domain to external domain

* ADD more test

* ADD deferred emission endpoint methods and entity

* Implement LEARCredentialEmployee, fix dids deletion

* credential entity db persistance and operations, deferred endpoint logic

* refactor from jpa to R2DBC, credential retrival endpoint

* add deferred signing

* WIP review

* fix dependencies issues

* fetch tx_code from keycloak, fix format const, remove format from credentialResponse

* fix vc and vcpayload generation, fix signature

* ¨¨new entities wip

* persistance in credential_managment and credential_deferred tables

* add credential retrival and format

* tests

* decouple local signature mock, add json parsing to credential retrival

* minor fixes

* merge and fix test

* fix some tests

* Solve sonar issues

* Tests

* Update VerifiableCredentialIssuanceServiceImplTest.java

* add test for CredentialManagementController

* fix credentialManagementController test

* Update VerifiableCredentialIssuanceServiceImplTest.java

* appConfiguration for db

* test

* remove unused imports

* Tests

* add test for cbor

* db connection data in application file

* function and plugins for automatic dependencies update

* add webclient bean

* custom exceptions and using builder

* endpoint versions

* use of builder, credential status enum, constants for hardcoded data, custom exceptions

* fix globalExceptionHandler

* fix controllers with try catch blocks

* fix tests and sonar issue

* fix jwt decoder, update credential offer format and encoding

* Support for Accept-Language header. Only LEARCredentialEmployee in metadata endpoint

* fix: custom exception, error handling, content-language header and constants

* dedicated service for access token and userid extraction

* fix credential id and mandatee did injection

* clean tests from sonar issues

* implement EmailService for pin notification

* batch signed credentials update and pending credentials endpoints

* fix credentialOffer cache bug

* add tests

* Lear Profile changes

* Add LEARCredentialEmployee logic

* move nonce generation and validation to authorization server

* implement template for email

* LearChanges

* Lear Credential Changes

added enpoint to bind the access token to te corrrect Deferred Credential Metadata

* Add LEAR logic

* Comment tests

* Update version

* Remove unused imports

* Update VerifiableCredentialIssuanceServiceImpl.java

* Clean Credential Mocks

* Refactor issuer

* Refactor issuer

* Refactor controllers

* Refactor Dokerfile

* Fixes Dokerfile
Fixes Checkstyle

* Update Auth Server config

* Update configs

* Update configs

* Update configs

* Fix Factory

* Fix AZ config

* Fix AZ config

* Fix AZ config

* Issuer refactor

* unsecure endpoint for demo pruposes

* fix security

* update endpoints

* LEAR changes

* testing changes

* update client auth

* some changes

* some fix

* changes

* remove unused endpoint

* Changes

Add template for mandator email and logic.

* Fix test

* Add constant

* Update CredentialOfferController.java

* update security

* Fix naming

* Changes LearCredential

* Update CredentialProcedureServiceImpl.java

* credential management get all credentials

* cahnges

* credential management get credential details

* update date format for get all credentials

* Cahnges

* Update SecurityConfig.java

* Add format

* Fix

* Fix

* public endpoints for credential management

---------

Co-authored-by: Dmitri Sidorov <dmitri.sidorov@in2.es>
Co-authored-by: Oriol Canadés <83498869+oriolcanadesin2@users.noreply.github.com>
Co-authored-by: Oriol Canadés <oriol.canades@in2.es>

* Feature/credentials management (#21)

* email reminder notification

* add pend_download status into flow

* update organizationId fetching in controller

* some fixes for smtp server support

* organizationId from current session for new credential

* fix payload generation(iss, sub, and date format)

* temporary unsecure deferred-credntials endpoints

* securized endpoints, did:elsi prefix for issuer, notification endpoint pathvariable

* add @context to credential

* mutual tls WIP

* organizationid from certificate deferred-credentials

* Feature/credentials-management-tests (#22)

* Firsts basic tests + commented test fix

* util package coverage > 80%

* Infrastructure->Properties package coverage > 80%

* Infrastructure->controller package coverage > 80%

* Created test for workflows package

* Reorganization of model test files + new tests

* Domain->Entities package coverage > 80% + last branch merge

* Domain->Factory package coverage > 80%

* Tests for AuthServerConfig class + sonarlint issues fix

* New tests for config package

* test for verifiableCredentialService

* Service tests + use of @ExtendWith instead of MockitoAnnotations

* test for CredentialProcedureService

* New service tests

* Plugins and dependencies updates + Sonar corrections

* DTO package path correction

---------

Co-authored-by: RubenModamioGarcia <ruben.modamio@in2.es>
Co-authored-by: Dmitri Sidorov Manko <159002112+dmitriin2@users.noreply.github.com>

---------

Co-authored-by: @juanmartinin2 <154328203+juanmartinin2@users.noreply.github.com>
Co-authored-by: RubenModamioGarcia <ruben.modamio@in2.es>

---------

Co-authored-by: rubenmodamioin2 <145454887+rubenmodamioin2@users.noreply.github.com>
Co-authored-by: Dmitri Sidorov <dmitri.sidorov@in2.es>
Co-authored-by: Oriol Canadés <83498869+oriolcanadesin2@users.noreply.github.com>
Co-authored-by: Dmitri Sidorov Manko <159002112+dmitriin2@users.noreply.github.com>
Co-authored-by: @juanmartinin2 <154328203+juanmartinin2@users.noreply.github.com>
Co-authored-by: RubenModamioGarcia <ruben.modamio@in2.es>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants